{include file="pub_header.htm"}
<div class="out_table">
<table width="100%" cellpadding="6" cellspacing="6" border="0" align="center" class="frame_table">
  <tr>
    <td width="20%" align="center" valign="top" bgcolor="#EEEEEE">
      {include file="pub_submenu.htm"}
    </td>
    <td width="80%" align="center" valign="top" bgcolor="#FFFFFF">

      {if $get.ope == "move"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=topic&channel_id=0" target="_self" class="current_place">帖子管理</a>
            {foreach name=sort_current from=$sort_current item=sort_current}
            &raquo; <a href="{$control_admin}?act=topic&channel_id={$sort_current.id}" target="_self" class="current_place">{$sort_current.name|str_entag:'space,br'}</a>
            {/foreach}
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=topic&ope=add&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">添加帖子</a>
            <a href="{$control_admin}?act=topic&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">返回列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form action="{$control_admin}?act=topic&ope=save_move&channel_id={$get.channel_id}&topic_id={$get.topic_id}&pag={$get.pag}" method="post" id="article_move" name="article_move">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td>移动帖子</td>
        </tr>
        <tr align="left">
          <td align="left">
          <table border="0" cellspacing="1" cellpadding="3">
            <tr>
              <td>
              <select name="channel_tree_from" size="24" style="height:300px;" class="select" disabled>
                {foreach name=channel_tree_from from=$channel_tree_from item=channel_tree_from}
                  {if $channel_tree_from.selected=="1"}
                  <option value="{$channel_tree_from.id}" selected="selected">{$channel_tree_from.name|indent:$channel_tree_from.depth:"&nbsp;&nbsp;&nbsp;&nbsp;"}</option>
                  {else}
                  <option value="{$channel_tree_from.id}">{$channel_tree_from.name|indent:$channel_tree_from.depth:"&nbsp;&nbsp;&nbsp;&nbsp;"}</option>
                  {/if}
                {/foreach}
              </select>
              </td>
              <td>移动到 &raquo;</td>
              <td>
              <select name="channel_tree_to" size="24" style="height:300px;" class="select">
                {foreach name=channel_tree_to from=$channel_tree_to item=channel_tree_to}
                  {if $channel_tree_to.disable=="1"}
                  <optgroup label="{$channel_tree_to.name|indent:$channel_tree_to.depth:"&nbsp;&nbsp;&nbsp;&nbsp;"}"></optgroup>
                  {else}
                  <option value="{$channel_tree_to.id}">{$channel_tree_to.name|indent:$channel_tree_to.depth:"&nbsp;&nbsp;&nbsp;&nbsp;"}</option>
                  {/if}
                {/foreach}
              </select>
              </td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="submit" name="submit" value="移动" class="submit">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {else}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=topic&channel_id=0" target="_self" class="current_place">帖子管理</a>
            {foreach name=sort_current from=$sort_current item=sort_current}
            &raquo; <a href="{$control_admin}?act=topic&channel_id={$sort_current.id}" target="_self" class="current_place">{$sort_current.name|str_entag:'space,br'}</a>
            {/foreach}
          </td>
          <td align="right" nowrap>
            {if $get.channel_id != "0"}
            [
            <a href="{$control_admin}?act=topic&ope=add&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">添加帖子</a>
            <a href="{$control_admin}?act=topic&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">返回列表</a>
            ]
            {else}
            &nbsp;
            {/if}
          </td>
        </tr>
      </table>
      </div>

      {if $channel_sub|@is_array && $channel_sub|@count > 0}
      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td>子目录</td>
        </tr>
        <tr align="left">
          <td>
          {foreach name=channel_sub from=$channel_sub item=channel_sub}
            {if $admin.ag_privilege.topic == "1" || ($admin.ag_privilege.topic == "3" && $channel_sub.channel_manage_admin_id != "")}
            <a href="{$control_admin}?act=topic&channel_id={$channel_sub.id}" target="_self">{$channel_sub.name|str_entag:'space,br'}</a>
            {else}
            {if $channel_sub.sub_record > 0}
            <a href="{$control_admin}?act=topic&channel_id={$channel_sub.id}" target="_self"><span class="disable">{$channel_sub.name|str_entag:'space,br'}</span></a>
            {else}
            <span class="disable">{$channel_sub.name|str_entag:'space,br'}</span>
            {/if}
            {/if}
            {if $smarty.foreach.channel_sub.last != true}│{/if}
          {/foreach}
          </td>
        </tr>
      </table>
      </div>
      {/if}
      {if $admin.ag_privilege.topic == "1" || ($admin.ag_privilege.topic == "3" && $channel_info.channel_manage_admin_id != "")}
      <div class="space"></div>
      <div class="right_table">
      <form action="{$control_admin}?act=topic&ope=del&channel_id={$get.channel_id}&pag={$get.pag}" method="post" id="topic_list" name="topic_list">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="10">帖子列表</td>
        </tr>
        <tr class="block_title">
          <td width="5%" nowrap>选择</td>
          <td width="10%" nowrap>版块</td>
          <td width="40%" align="left" nowrap>标题</td>
          <td width="10%" nowrap>发帖人</td>
          <td width="10%" nowrap>时间</td>
          <td width="10%" nowrap>浏览/回复</td>
          <td width="5%" nowrap>精华</td>
          <td width="5%" nowrap>置顶</td>
          <td width="5%" nowrap>关闭</td>
          <td width="10%" nowrap>操作</td>
        </tr>
        {foreach name=topic_list from=$topic_list item=item}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td nowrap><input type="checkbox" id="choice[{$item.id}]" name="choice[{$item.id}]" handle="topic" value="{$item.id}"></td>
          <td nowrap title="{$channel_info.name|str_entag:'space,br'}"><a href="{$control_admin}?act=channel&ope=amend&channel_id={$get.channel_id}" target="_self">{$channel_info.name|str_cut:0:10|str_entag:'space,br'}</a></td>
          <td align="left">
            {if $topic_list[$item.id].trans|@is_array && $topic_list[$item.id].trans|@count > 0}[{foreach name=topic_list_trans from=$topic_list[$item.id].trans item=topic_list_trans}<a href="{$control_admin}?act=trans&ope=amend&trans_id={$topic_list_trans.trans_id}" target="_self">{$topic_list_trans.trans_name}</a>{if !$smarty.foreach.topic_list_trans.last}|{/if}{/foreach}]{/if}
            <a href="{$control_index}?act=topic&topic_id={$item.id}" target="_blank" title="{$item.subject|str_entag:'space,br'}">{$item.subject|str_entag:'space,br'}</a>
          </td>
          <td nowrap><a href="{$control_admin}?act=member&mid={$item.post_mid}" target="_self">{$item.post_musername}</a></td>
          <td nowrap><span title="{$item.post_time|date_format:"%Y-%m-%d %H:%M:%S"}">{$item.post_time|date_format:"%Y-%m-%d"}</span></td>
          <td nowrap>{$item.number_click}/{$item.number_reply}</td>
          <td nowrap>
            {if $item.if_elite == "1"}
              <span style="color:#00AA00;" title="当前精华为开启!">开</span>
              <a href="{$control_admin}?act=topic&ope=if_elite&topic_id={$item.id}&if_elite=2&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将精华更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=topic&ope=if_elite&topic_id={$item.id}&if_elite=1&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将精华更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前精华为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_top == "1"}
              <span style="color:#00AA00;" title="当前置顶为开启!">开</span>
              <a href="{$control_admin}?act=topic&ope=if_top&topic_id={$item.id}&if_top=2&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将置顶更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=topic&ope=if_top&topic_id={$item.id}&if_top=1&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将置顶更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前置顶为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_close == "1"}
              <span style="color:#00AA00;" title="当前关闭为开启!">开</span>
              <a href="{$control_admin}?act=topic&ope=if_close&topic_id={$item.id}&if_close=2&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将关闭更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=topic&ope=if_close&topic_id={$item.id}&if_close=1&channel_id={$get.channel_id}&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将关闭更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前关闭为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            <a href="{$control_admin}?act=topic&ope=move&channel_id={$get.channel_id}&topic_id={$item.id}&pag={$get.pag}" target="_self"><img src="{$dir_images_admin}/icon_arrow.gif" border="0" alt="移" title="移动此版块" /></a>
            <a href="{$control_admin}?act=topic&ope=del&channel_id={$get.channel_id}&topic_id={$item.id}&pag={$get.pag}" target="_self" onClick="return confirm('真的要删除记录?')"><img src="{$dir_images_admin}/icon_delete.gif" border="0" alt="删" title="删除记录"></a>
          </td>
        </tr>
        {/foreach}
        <tr class="block_footer">
          <td colspan="10">
          <table width="100%" cellpadding="0" cellspacing="0" border="0" class="table_clean">
            <tr>
              <td align="left">
              <input type="button" id="check_on" name="check_on" value="全选" class="button">
              <input type="button" id="check_off" name="check_off" value="不选" class="button">
              <input type="button" id="check_toggle" name="check_toggle" value="反选" class="button">
              </td>
              <td align="right">
              <input type="submit" value="删除" class="button" onClick="return confirm('真的要删除记录?')">
              </td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
      </form>
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center">
        <tr>
          <td align="left">&nbsp;</td>
          <td align="right">
            <span class="pagination_post_list">
              <span class="pagelink_side" title="Total record{$pagination.record_total}">{$pagination.record_total}</span>
              <span class="pagelink_side" title="Current page{$pagination.page_current}/Page{$pagination.page_total}"><font color="#EA7408">{$pagination.page_current}</font>/{$pagination.page_total}</span>
              {if $pagination.page_listbegin != ""}<span class="pagelink_side" title="Go to first page"><a href="{$pagination.url|print_format:$pagination.page_listbegin}" target="_self" class="pagehref">&laquo;</a></span>{/if}
              {if $pagination.page_listbegin_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listbegin_more}" target="_self" class="pagehref">...</a></span>{/if}
              {if $pagination.page_previous != ""}<span class="pagelink_side" title="Previous page"><a href="{$pagination.url|print_format:$pagination.page_previous}" target="_self" class="pagehref">&#8249;</a></span>{/if}
              {foreach name=page_list from=$pagination.page_list item=page_list}
                {if $page_list.if_current == "1"}
                  <span class="pagelink_current" title="Current page{$page_list.page}"><font color="#EA7408">{$page_list.page}</font></span>
                {else}
                  <span class="pagelink" title="{$page_list.page}"><a href="{$pagination.url|print_format:$page_list.page}" target="_self" class="pagehref">{$page_list.page}</a></span>
                {/if}
              {/foreach}
              {if $pagination.page_next != ""}<span class="pagelink_side" title="Next page"><a href="{$pagination.url|print_format:$pagination.page_next}" target="_self" class="pagehref">&#8250;</a></span>{/if}
              {if $pagination.page_listend_more != ""}<span class="pagelink_side" title="Jump {$pagination.page_listnum/2|@floor} page"><a href="{$pagination.url|print_format:$pagination.page_listend_more}" target="_self" class="pagehref">...</a></span>{/if}
              {if $pagination.page_listend != ""}<span class="pagelink_side" title="Go to last page"><a href="{$pagination.url|print_format:$pagination.page_listend}" target="_self" class="pagehref">&raquo;</a></span>{/if}
              <select onchange="self.location.href=this.options[this.selectedIndex].value" class="select">
              {if $pagination.page_selectbegin != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin}">{$pagination.page_selectbegin}</option>{/if}
              {if $pagination.page_selectbegin_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectbegin_more}">...</option>{/if}
              {foreach name=page_select from=$pagination.page_select item=page_select}
                {if $page_select.if_current == "1"}
                  <option value="{$pagination.url|print_format:$page_select.page}" selected="selected">{$page_select.page}</option>
                {else}
                  <option value="{$pagination.url|print_format:$page_select.page}">{$page_select.page}</option>
                {/if}
              {/foreach}
              {if $pagination.page_selectend_more != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend_more}">...</option>{/if}
              {if $pagination.page_selectend != ""}<option value="{$pagination.url|print_format:$pagination.page_selectend}">{$pagination.page_selectend}</option>{/if}
              </select>
            </span>
          </td>
        </tr>
      </table>
      </div>
      {/if}
      {/if}

    </td>
  </tr>
</table>
{include file="pub_footer.htm"}